function jsonp(url,options={}){
	return new Promise(function(resolve){
		let {params={},jsonp='callback',fnName} = options;
		if(!fnName)
		    fnName = "zhang"+Math.random().toString(36).slice(2)+Date.now();
		// window[fnName] = function(data){
		// 	resolve(data);
		// }
		window[fnName] = resolve;
		params[jsonp] = fnName;
		// console.log(Object.keys(params).map(key=>key+"="+params[key]).join("&"));
		url+="?"+Object.keys(params).map(key=>key+"="+params[key]).join("&");
		const script = document.createElement("script");
		script.src = url;
		script.onload = function(){
			document.body.removeChild(script);
			delete window[fnName];
		}
		document.body.appendChild(script);
	})
	
}